const express = require('express');
const app = new express();


//引入跨域模块
app.use(require("cors")());


app.use(express.json());


//引入数据库模块
require('./plugins/db.js')(app);

//引入路由模块
require('./routes/adminindex.js')(app);
require('./routes/userindex.js')(app);

app.listen(3000,() => {
    console.log('server is running on http://localhost:3000');
});